Skip to content

Expands support for Anthropic thinking & Adds support for effort. - #211

Open
ActuallyTaylor wants to merge 1 commit into
huggingface:mainfrom
ActuallyTaylor:anthropic-thinking-effort
Open

Expands support for Anthropic thinking & Adds support for effort.#211
ActuallyTaylor wants to merge 1 commit into
huggingface:mainfrom
ActuallyTaylor:anthropic-thinking-effort

Conversation

@ActuallyTaylor

Copy link
Copy Markdown
Contributor

This adds support for Anthropic new thinking modes as well as their effort modes. When combined these allow for the model to return thinking deltas.

@mattt

mattt commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Hi @ActuallyTaylor. Thanks for splitting this out so quickly. A few things before it can go in:

  • service_tier stopped being sent — the if let serviceTier block got dropped when the thinking block was rewritten. Could you restore it?
  • The wire value for extra-high effort is xhigh (all lowercase), so case extraHigh = "xHigh" will be rejected by the API.
  • swift format lint --strict --recursive . fails on trailing whitespace and a few long lines. swift format --in-place --recursive . should clear it.
  • The stream: parameter on createMessageParams isn't used by either call site (streaming sets params["stream"] itself), so it can go.
  • Tiny: ThinkingDelta should conform to Sendable, not SendableMetatype.

Decoding thinking_delta and signature_delta without yielding them yet is fine for this PR; surfacing them can follow the #103 shape. As discussed on #176, this goes in with the next minor since Thinking.init changes shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants